To access Objective-C code from a WebScript file, you simply use the Objective-C class like any other class:
id myObject = [[MyCustomObjCClass alloc] init];To access a WebScript object from Objective-C code, you simply get the object that implements the method and send it a message. If you're accessing a method in the application script, you can use this WOApplication method to access the object:
[[WOApplication application] applicationScriptMethod];To avoid compiler warnings when accessing WebScript objects from Objective-C, create a header file for the scripted component as though it were compiled. This step isn't strictly required, of course-your code will still build, you'll just get warnings.
Table of Contents
Next Section